<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <h1>这是前端的页面</h1>

    <button>修改字号大小</button>

    <script>
        function randomColor() {
            return '#' + Math.random().toString(16).slice(2).slice(-6).padStart(6, '0')
        }

        function changeColor() {
            console.log('modify color')
            document.querySelector('h1').style.color = randomColor()
        }

        document.querySelector('button').onclick = () => {
            changeSize()
        }
    </script>
</body>
</html>